<%@ page pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>    
    <title>"Webkit Demo"</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script type="text/javascript" src="${pageContext.request.contextPath}/jquery.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/meyou.js"></script>
	<script type="text/javascript">
	$(document).ready(function() {
	   var item  = $(':radio[name=items]');
	   
	   $('input[name=value]').each(function(){
		     $(this).css("width","300");
        });

	   
	    var url = "${SERVER}";
	    var model = "${module}";
	
	    if (url != "") {
	        $("#SERVER_URL").val(url);
	    }
	
	    if (model != "") {
	        $("#module").val(model);
	    }
	});
	</script>
  </head>
  
  
  <body>
  	<p align="center"><img alt="" src="${pageContext.request.contextPath}/checkCode.do"> </p>
  	<p align="center"><b>SERVLET FORWARD DEMO</b></p>
    <form method="post" action="${pageContext.request.contextPath}/demoServlet.do" enctype="application/x-www-form-urlencoded">
        <table id="datatable" width="600" align="center" border="1">
            <tr>
                <th>序号</th>
                <th>名称</th>
                <th>字段值</th>
            </tr>
            <tr>
                <td>0</td>
                <td><input id="key0"     type="text" name="name" value="servlet"/></td>
                <td><input id="value0"   type="text" name="value" value="123456"/></td>
            </tr>
            <tr>
                <td colspan="4" align="center"><button type="submit">提交</button></td>
            </tr>
        </table>
    </form>
    <p></p>
    
    <p align="center"><b>SERVLET REDIRECT DEMO</b></p>
    <form method="post" action="${pageContext.request.contextPath}/demoRedirect.do" enctype="application/x-www-form-urlencoded">
        <table id="datatable" width="600" align="center" border="1">
            <tr>
                <th>序号</th>
                <th>名称</th>
                <th>字段值</th>
            </tr>
            <tr>
                <td>0</td>
                <td><input id="key0"     type="text" name="name" value="servlet"/></td>
                <td><input id="value0"   type="text" name="value" value="123456"/></td>
            </tr>
            <tr>
                <td colspan="4" align="center"><button type="submit">提交</button></td>
            </tr>
        </table>
    </form>
    <p></p>
    
    <p align="center"><b>STREAM DEMO</b></p>
    <form method="post" action="${pageContext.request.contextPath}/demoStream.do" enctype="application/x-www-form-urlencoded">
        <table id="datatable" width="600" align="center" border="1">
            <tr>
                <th>序号</th>
                <th>名称</th>
                <th>字段值</th>
            </tr>
            <tr>
                <td>0</td>
                <td><input id="key0"     type="text" name="name" value="Stream demo"/></td>
                <td><input id="value0"   type="text" name="value" value="1001"/></td>
            </tr>
            <tr>
                <td colspan="4" align="center"><button type="submit">提交</button></td>
            </tr>
        </table>
    </form>
    <p></p>
    
    <p align="center"><b>ARRAY DEMO</b></p>
    <form method="post" action="${pageContext.request.contextPath}/array.do" enctype="application/x-www-form-urlencoded">
        <table id="datatable" width="600" align="center" border="1">
            <tr>
                <th>序号</th>
                <th>名称1</th>
                <th>名称2</th>
            </tr>
            <tr>
                <td>0</td>
                <td><input id="key0"     type="text" name="names" value="Freemarker"/></td>
                <td><input id="value0"   type="text" name="names" value="JSON"/></td>
            </tr>
            <tr>
                <td colspan="4" align="center"><button type="submit">提交</button></td>
            </tr>
        </table>
    </form>
    <p></p>
    
     <p align="center"><b>FILE UPLOAD DEMO</b></p>
    <form method="post" action="${pageContext.request.contextPath}/file.do" enctype="multipart/form-data">
        <table id="datatable" width="600" align="center" border="1">
            <tr>
                <th>序号</th>
                <th>名称1</th>
                <th>名称2</th>
            </tr>
            <tr>
                <td>0</td>
                <td><input id="key0"  type="file" name="file" /></td>
                <td></td>
            </tr>
            <tr>
                <td colspan="4" align="center"><button type="submit">提交</button></td>
            </tr>
        </table>
    </form>
    <p></p>
    
     <p align="center"><b>TEXT DEMO</b></p>
    <form method="post" action="${pageContext.request.contextPath}/demoText.do">
        <table id="datatable" width="600" align="center" border="1">
            <tr>
                <th>序号</th>
                <th>名称1</th>
                <th>名称2</th>
            </tr>
            <tr>
                <td>0</td>
                <td><input id="key0"  type="text" name="name" /></td>
                <td></td>
            </tr>
            <tr>
                <td colspan="4" align="center"><button type="submit">提交</button></td>
            </tr>
        </table>
    </form>
    <p></p>
  </body>
</html>
